/*
	File:		CharacterSelectionState.h
	Course:		SGD 1301
	Author:		Peter Nguyen
	Purpose:	CharacterSelectionState allows the player to choose a ship
*/

#pragma once

#include "IGameState.h"
#include <vector>

// Wrappers
class CSGD_DirectInput;
class CSGD_TextureManager;
class CBitmapFont;

struct SMenuItem;

struct SCharacterItem
{
public:
	float FireRate,AccelerationRate,MaxSpeed,TurningSpeed;
	int imageID;
	SCharacterItem(float _fireRate,float _accelerationRate, float _maxSpeed, float _turningRate)
	{
		FireRate = _fireRate;
		AccelerationRate = _accelerationRate;
		MaxSpeed=_maxSpeed;
		TurningSpeed=_turningRate;
	}
};

struct SBackgroundItem;
////////////////////////////////////////////////////////////
// CMainMenuState class
//	- game state to handle main menu
class CCharacterSelection : public IGameState
{
public:
	////////////////////////////////////////////////////////
	// SINGLETON!
	static CCharacterSelection* GetInstance( void );
	
	
	////////////////////////////////////////////////////////
	// IGameState Interface:
	virtual void	Enter	( void );			// load resources
	virtual void	Exit	( void );			// unload resources

	virtual bool	Input	( void );			// handle user input
	virtual void	Update	( float fElapsedTime );	// update game entities
	virtual void	Render	( void );			// render game entities
	int				GetCharacterSelectionPositon(void) {return m_nCharacter_CursorPos;};
	
public:
	std::vector<SCharacterItem*> characterVector;
private:
	////////////////////////////////////////////////////////
	// Singleton - not dynamically allocated
	CCharacterSelection( void );
	virtual ~CCharacterSelection( void );
	CCharacterSelection( const CCharacterSelection& );
	CCharacterSelection& operator= ( const CCharacterSelection& );
	
	////////////////////////////////////////////////////////
	// Wrappers
	CSGD_DirectInput*		m_pDI;
	CSGD_TextureManager*	m_pTM;
	CBitmapFont*			m_pFont;
	
	////////////////////////////////////////////////////////
	//menu items
	std::vector<SMenuItem*> menuVector;
	float sinWave;
	SBackgroundItem* shipBI;

	////////////////////////////////////////////////////////
	// Image Asset
	int						m_nCursorImageID;
	int						m_nShipImageID[5];
	int						m_nCursorPos;
	int						m_nMenuSize;

	int						m_nCharacter_CursorPos;
	int						m_nCharacter_MenuSize;
};

